package com.bawei.property.entity

import com.bawei.net.BaseResponse
import com.blankj.utilcode.util.GsonUtils
import org.json.JSONArray
import java.io.Serializable

data class ColorListResultEntity(
    val values: String
):BaseResponse(){
    fun getValues(): List<ColorValue>{
        var list = mutableListOf<ColorValue>()
        var data = JSONArray(values)
        for (i in 0 until  data.length()){
            list.add(GsonUtils.fromJson(data[i].toString(), ColorValue::class.java))
        }
        return list
    }
}


data class ColorValue(
    var colorId: Int,
    var colorValue: String,
):Serializable
